/**
 * 重命名文件名称
 *  
 */

console.info("---------fs rename() ----------");
console.info();

var fs = require("fs");
console.time("fs-rename-syn");

fs.renameSync("txt/helloworld-syn.txt","txt/helloworld-syn-rename.txt");
console.timeEnd("fs-rename-syn");

console.info();

var exec = require("child_process").exec;
var child_pre = exec("cat txt/helloworld-syn.txt stout;",function(error,stdout,stderr){
    console.info("cat txt/helloworld-syn.txt stdout: ");
    console.log(stdout);
    console.log(stderr);

});

console.info();
var child_suf = exec("cat txt/helloworld-syn-rename.txt stout;",function(error,stdout,stderr){
    console.info("cat txt/helloworld-syn-rename.txt stdout: ");
    console.log(stdout);
    console.log(stderr);
})